package com.coder4j.platform.controller;

import com.coder4j.starter.mybatis.BasePage;
import com.coder4j.starter.tools.vo.R;
import com.coder4j.starter.web.BaseController;
import com.coder4j.platform.entity.SysUnicodeEntity;
import com.coder4j.platform.mapper.SysUnicodeMapper;
import com.coder4j.platform.service.SysUnicodeService;
import com.coder4j.platform.vo.SysUnicodeQuery;
import com.coder4j.platform.vo.SysUnicodeVO;
import com.coder4j.platform.vo.SysUnicodeEO;
import com.coder4j.starter.web.api.ApiNote;
import org.springframework.web.bind.annotation.*;

import lombok.extern.slf4j.Slf4j;
import javax.annotation.Resource;
import java.util.List;
import java.util.stream.Collectors;

/**
 * Unicode
 * @author keller
 * @date 2025-06-26 23:34:31
 */
@Slf4j
@RestController
@RequestMapping("/sysUnicode")
public class SysUnicodeController extends BaseController<SysUnicodeEntity,SysUnicodeVO,SysUnicodeEO,SysUnicodeQuery, SysUnicodeMapper,SysUnicodeService> {
    @Resource
    private SysUnicodeService service;

    @PostMapping("/queryList")
    @ApiNote(name="查询",createName = "keller",createTime = "2024-12-05 10:46:31")
    public R queryList(@RequestBody SysUnicodeQuery query){
        List<SysUnicodeEntity> list = service.baseQueryList(query);
        list = list.stream().filter(item -> item.getCanShow().equals(1)).collect(Collectors.toList());
        return R.success(list);
    }

}
